package com.zl.common;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.springframework.web.servlet.view.freemarker.FreeMarkerView;

import com.zl.util.PropertiesHelper;

/**
 * @author chxl
 *freemarker 视图解析器
 */
public class PathFreeMarkerView extends FreeMarkerView{

	private static final String CONTEXT_PATH = "base";
	 
    @Override
    protected void exposeHelpers(Map<String, Object> model, HttpServletRequest request) throws Exception {
        model.put(CONTEXT_PATH, request.getContextPath());
        
        String appname = Config.getInstance().getCustomValue("app.name");
        model.put("title", appname);
        super.exposeHelpers(model, request);
    }
}
